using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using DevExpress.XtraReports.UI;
using BusinessLayer;

namespace DeAn_LapTrinhCSDL.Report
{
    public partial class rpThongKeTinhHinhDatNhap : DevExpress.XtraReports.UI.XtraReport
    {
        XuLy xl;
        ThongKe tk;
        public rpThongKeTinhHinhDatNhap()
        {
            InitializeComponent();
            xl = new XuLy();
            xl.connect.ConnectionString = Program.strConnect;
            tk = new ThongKe();
            tk.connect.ConnectionString = Program.strConnect;
        }

        private void xrLabel_NgayThang_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
            xrLabel_NgayThang.Text = xl.ConvertToVietnameseDateTime(DateTime.Now);
        }

        private void DetailReport_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
            DetailReport.DataSource = tk.GetDataThongKeTinhHinhDatNhap(GetCurrentColumnValue("SODH").ToString());
        }
    }
}
